import request from '@/services/request';
import qs from 'qs';

export async function addUser(body, options?: { [key: string]: any }) {
  return request('/api/user/insert', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

export async function editUser(body, options?: { [key: string]: any }) {
  return request('/api/user/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

export async function deleteUser(body, options?: { [key: string]: any }) {
  return request('/api/user/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
export async function selectUser(body, options?: { [key: string]: any }) {
  return request('/api/user/selectall', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}